1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method which can be used for a digital camera.
2. Description of the Related Art
Conventionally, in, for example, a digital camera for recording captured digital image data in a recording medium, plural stages of image processing are carried out in the course of recording. For example, image processing are carried out, such as: (i) a Bayer interpolation processing for converting Bayer data temporarily stored in a memory at the time of capturing, i.e., image data composed of pixels of color information according to color filters in a primary color Bayer array into YUV data (luminance and color difference data) which includes RGB data for each pixel; (ii) a magnification change processing for increasing or decreasing the number of pixels of the YUV data after converted, thereby achieving a digital zoom function or the like; and (iii) a JPEG encode processing. In addition, in such an image processing, data for a plurality of lines called a band-shaped belt obtained by dividing the whole screen in a vertical direction has been defined in processing units instead of defining data on the whole image (Bayer data or YUV data) in processing units, and the data has been read out and processed sequentially from a work memory belt by belt.
On the other hand, at the time of the JPEG encode processing, encoding is carried out in block units (MCU) of 8×8 pixels if the encode format is, for example, 4:2:2, and encoding is carried out in block units of 16×16 pixels if the above format is 4:2:0. Thus, in the case where each of the above-described processings is carried out by hardware for the purpose of high speed operation, it is necessary to provide 8 or 16 lines of a belt to be input to a unit for the JPEG encode processing. Therefore, a magnification which can be set in the magnification change processing prior to the JPEG encode processing is limited to a value which corresponding to the number of lines which can be directly processed by the JPEG encode processing, i.e., the magnification is limited to a multiple of 8.
In order to solve this problem, Jpn. Pat. Appln. KOKAI Publication No. 2003-18610 discloses a method of additionally providing a buffer memory in a unit for magnification change processing; temporarily decompressing and storing YUV data for one screen after magnification-changed; and transferring the YUV data from the buffer memory to a unit for JPEG encode processing in units of 8 lines at a time when the YUV data for one screen is stored in the buffer memory. According to such a method, a digital zoom function capable of setting a vast variety of magnifications can be achieved without being subject a restriction to the magnifications.